#!/bin/python3
#-*- coding: utf-8 -*-
# exp_17.py
# @author 刘秋
# @email lq@aqiu.info
# @description 
# @created 2020-02-18T22:41:05.299Z+08:00
# @last-modified 2020-04-16T08:27:02.134Z+08:00
# 输入一行字符，分别统计出其中英文字母、空格、数字和其它字符的个数。

import string

s = input("请输入一个字符串：\n")
letters = 0
space = 0
digit = 0
others = 0

for i in list(s):
    if i.isalpha():
        letters+=1
    elif i.isspace():
        space+=1
    elif i.isdigit():
        digit+=1
    elif i.isothers():
        others +=1
print(f"字符={letters},空格={space},数字={digit},其他字符2={others}")